singleselection: Make tests build without warnings
authorMatthias Clasen <mclasen@redhat.com>
Fri, 15 Feb 2019 15:20:48 +0000 (10:20 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 15 Feb 2019 15:23:48 +0000 (10:23 -0500)
testsuite/gtk/singleselection.c

index efe4a91ece5c74543d3712bdb775ca60573cdc85..f13fbacebf69a048ccf8dde8d1fae90360f1d11b 100644 (file)
@@ -298,6 +298,7 @@ test_create (void)
   g_object_unref (selection);
 }
 
+#if GLIB_CHECK_VERSION (2, 58, 0) /* g_list_store_splice() is broken before 2.58 */
 static void
 test_changes (void)
 {
@@ -332,7 +333,9 @@ test_changes (void)
   g_object_unref (selection);
   g_object_unref (store);
 }
+#endif
 
+#if GLIB_CHECK_VERSION (2, 59, 0) /* g_list_store_get_item() has overflow issues before */
 static void
 test_selection (void)
 {
@@ -383,7 +386,9 @@ test_selection (void)
   g_object_unref (store);
   g_object_unref (selection);
 }
+#endif
 
+#if GLIB_CHECK_VERSION (2, 59, 0) /* g_list_store_get_item() has overflow issues before */
 static void
 test_autoselect (void)
 {
@@ -418,7 +423,9 @@ test_autoselect (void)
   g_object_unref (store);
   g_object_unref (selection);
 }
+#endif
 
+#if GLIB_CHECK_VERSION (2, 59, 0) /* g_list_store_get_item() has overflow issues before */
 static void
 test_can_unselect (void)
 {
@@ -449,7 +456,9 @@ test_can_unselect (void)
   g_object_unref (store);
   g_object_unref (selection);
 }
+#endif
 
+#if GLIB_CHECK_VERSION (2, 59, 0) /* g_list_store_get_item() has overflow issues before */
 static int
 sort_inverse (gconstpointer a, gconstpointer b, gpointer data)
 {
@@ -484,6 +493,7 @@ test_persistence (void)
   g_object_unref (store);
   g_object_unref (selection);
 }
+#endif
 
 static void
 check_query_range (GtkSelectionModel *selection)